package adv330;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;

/**
 * @author oldliu
 * @since 1.0
 */
public class FileRead {
    public static void main(String[] args) {
        InputStream in=null;
        try {
             in=new FileInputStream("E:\\java_workspace\\IdeaProjects\\java83\\java高级\\src\\adv330\\FileTest4" +
                    ".java");
            int ch=0;
            while ((ch=in.read())!=-1){
                System.out.println(ch+","+(char)ch);
            }
            //in.close()有隐患
        } catch (IOException e) {
            e.printStackTrace();
        }finally {
            try {
                in.close();
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }
}
